package zuoye;

//1定义女朋友类，定义String类型姓名，
// double类型身高和double类型体重三个成员变量，三个成员变量都用privice修饰。
public class GirlFriend {
    private String xingming;
    private double shengao;
    private double tizhong;

//2、提供空参构造方法和有参构造方法。
    public GirlFriend() {
    }

    public GirlFriend(String xingming, double shengao, double tizhong) {
        this.xingming = xingming;
        this.shengao = shengao;
        this.tizhong = tizhong;
    }
    //3、提供set/get方法。
    public String getXingming() {
        return xingming;
    }

    public void setXingming(String xingming) {
        this.xingming = xingming;
    }

    public double getShengao() {
        return shengao;
    }

    public void setShengao(double shengao) {
        this.shengao = shengao;
    }

    public double getTizhong() {
        return tizhong;
    }

    public void setTizhong(double tizhong) {
        this.tizhong = tizhong;
    }

    //	4，编写展示方法show()，方法打印三个成员变量的值
    public void show() {
        System.out.println("姓名：" + xingming + " " + "身高：" + shengao + "cm " + "体重" + tizhong + "斤 ");
    }

    //  5、编写洗衣服wash()方法，输出洗衣服的语句。
    public void wash() {
        System.out.println("洗衣");
    }

    //  6、编写做饭cook()方法，输出做饭的语句。
    public void cook() {
        System.out.println("做饭");
    }

}
